Skip to content

feat: add empty state when no comparison is loaded (closes #26)#51

Merged
O2sa merged 1 commit intoO2sa:mainfrom
Ai-chan-0411:feat/improve-empty-state
Apr 11, 2026
Merged

feat: add empty state when no comparison is loaded (closes #26)#51
O2sa merged 1 commit intoO2sa:mainfrom
Ai-chan-0411:feat/improve-empty-state

Conversation

@Ai-chan-0411
Copy link
Copy Markdown
Contributor

Summary

Closes #26

When no comparison has been loaded yet, the page showed blank space below the form. This PR adds a friendly empty state with:

  • An SVG icon showing two user outlines (representing the comparison)
  • A clear message: "Enter two usernames to compare"
  • A subtitle explaining the feature: "Compare GitHub developer metrics side by side"

The empty state is hidden once loading starts, an error occurs, or comparison data is displayed.

Changes

  • app/page.tsx: Added conditional empty state block rendered when !loading && !error && !data

Test plan

  • Load the page fresh — empty state should be visible below the form
  • Enter two usernames and click Compare — empty state disappears during/after loading
  • Clear results with Reset — empty state should reappear

Show a friendly message with an illustration when no comparison
result is loaded yet, guiding users to enter two GitHub usernames.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 11, 2026

Someone is attempting to deploy a commit to the osama's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

Thank you for the pull request! ✅

A maintainer will review this soon. Please be patient while we take a look. 🙌

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dev-impact Ready Ready Preview, Comment Apr 11, 2026 8:16pm

@O2sa O2sa merged commit fd084c5 into O2sa:main Apr 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve empty state when no comparison is loaded

2 participants